<template>
	<view class="content">
		<button @click="stop">停止</button>
		<navigator open-type="reLaunch" url="/pages/classify/classify">分类</navigator>
		<button @click="show">显示</button>
		<button @click="hide">隐藏</button>
		<image class="logo" src="../../static/image/logo.png"></image>
		<view class="text-area" v-for="item in 100">
			<text class="title">{{item}}</text>
		</view>
		
	</view>
</template>

<script setup>
function stop(){
	uni.stopPullDownRefresh()
}
setTimeout(()=>{
	uni.startPullDownRefresh()
},1000)

	function show() {
		uni.showToast({
			title: "加载",
			// icon:'success'
			icon:'loading',
			// image: "../../static/image/logo.png",
			// mask: true,
			duration:3000
			// success: res => {
			// 	console.log(res)
			// }
		})
	}
	
function hide(){
	uni.hideToast({
	})
}
	const count = ref(0);
	const state = ref(true)
	onLoad(() => {
		console.log("onLoad,页面生命周期钩子");
	})
	onMounted(() => {
		console.log("onMounted,组件生命周期函数");
	})
	onReachBottom(() => {
		console.log("触底了")
	})
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>